Added support of partner API#20
Conversation
yuri-kovalev
commented
Jan 7, 2026
- Added support the partner API methods
-
- GetInstances
-
- CreateInstance
-
- DeleteInstanceAccount
- Added documentation for partner API methods
| public $partner; | ||
|
|
||
| public function __construct( $idInstance, $apiTokenInstance, $host = "https://api.green-api.com", $media = "https://media.green-api.com" ) { | ||
| public function __construct( $idInstance = null, $apiTokenInstance = null, $partnerToken = null, $host = "https://api.green-api.com", $media = "https://media.green-api.com" ) { |
There was a problem hiding this comment.
Any way php support named arguments from 8 version
new GreenApiClient(idInstance: 'idInstance', apiTokenInstance: 'apiTokenInstance', partnerToken: 'partnerToken')
| $this->statuses = new Statuses( $this ); | ||
| $this->partnerToken = $partnerToken; | ||
|
|
||
| if ($this->idInstance && $this->apiTokenInstance) { |
There was a problem hiding this comment.
I'm not sure about this, but for partner API there is no need to use idInstance and apiTokenInstance because we may not have them.
|
Added in v0.3.6 |
Seems you skip the Used here In my PR it was added here https://github.com/green-api/whatsapp-api-client-php/pull/20/changes#diff-e88c5bbb6585d483f32ade677e436442ceab0eea5154278f75c706a4341336bbR30 |
|
And if we no have In my PR it was realized https://github.com/green-api/whatsapp-api-client-php/pull/20/changes#diff-e88c5bbb6585d483f32ade677e436442ceab0eea5154278f75c706a4341336bbR85 |
|
@AshLeigh-Fraxinus please look at my comments |
|
@yuri-kovalev thanks, added with the new commit, you can update the library |
|
@AshLeigh-Fraxinus thank you very much |